//
//  ZoneViewController.m
//  UIHomeWork09-省市区三级页面
//
//  Created by tusm on 16/7/26.
//  Copyright © 2016年 tusm. All rights reserved.
//

#import "ZoneViewController.h"

@interface ZoneViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,retain)NSMutableArray *arrOfZone;
@end

@implementation ZoneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.arrOfZone = [NSMutableArray arrayWithArray:_cityMedian.array];
    self.navigationItem.title = _cityMedian.name;
    [self createSubView];
}
- (void)createSubView{
    _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    [self.view addSubview:_tableView];
    _tableView.delegate =self;
    _tableView.dataSource = self;
    
    [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool2"];

}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    return _arrOfZone.count;

}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"pool2"];
    
    cell.textLabel.text = [_arrOfZone[indexPath.row]name];
    return cell;
}
















- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
